package com.tengju.user.application.login.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotNull;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@ApiModel(value = "RegisterDTO", description = "注册请求参数对象")
@NoArgsConstructor
public class RegisterDTO {

    @ApiModelProperty("用户名/手机号")
    @NotNull(message = "用户名/手机号不能为空")
    private String username;

    @ApiModelProperty("密码")
    @NotNull(message = "密码不能为空")
    private String password;

    @ApiModelProperty("用户类型 1：用户 2：员工")
    @NotNull(message = "用户类型不能为空")
    private Integer userType;

    @ApiModelProperty("用户姓名")
    @NotNull(message = "用户姓名不能为空")
    private String realName;

    public RegisterDTO(
            @NotNull(message = "用户名/手机号不能为空") String username,
            @NotNull(message = "密码不能为空") String password,
            @NotNull(message = "用户类型不能为空") Integer userType,
            @NotNull(message = "用户姓名不能为空") String realName) {
        this.username = username;
        this.password = password;
        this.userType = userType;
        this.realName = realName;
    }
}
